package com.ruoyi.laiqianba.enums;

import cn.hutool.core.util.ObjectUtil;
import lombok.Getter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Getter
public enum UnionStatusEnum {


    INIT("INIT", "初始化")
    ,WAIT_LOGIN("WAIT_LOGIN", "待确认")
    ,SUCCESS("SUCCESS", "成功")
    ,FAILED("FAILED", "失败")

    ;

    private String value;
    private String name;

    UnionStatusEnum(String value, String name){
        this.value = value;
        this.name = name;
    }

    public static List<Map<String, String>> getMapList(){
        List<Map<String, String>> resultList = new ArrayList<>();
        for (UnionStatusEnum unionStatusEnum : values()) {
            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("key", unionStatusEnum.getName());
            itemMap.put("value", String.valueOf(unionStatusEnum.getValue()));
            resultList.add(itemMap);
        }
        return resultList;
    }

}
